<?
	global $db, $articles, $ArticleMain, $ArticleMainCid;
	
	$alias = isset($ArticleMainCid)? $ArticleMainCid:'';
	
	if($alias == '')
		$sql = "select * from articles where active = 1 order by id desc limit 4";
	else
		$sql = "select * from articles where active = 1 and cid = ".$alias." order by id desc limit 4";	
	
	//echo $sql;
	$articles = $db->getAll($sql);
	
	include(UC_DIR_TPL.'ArticleMain.ctp');
?>